home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / MATHS / ARCAUT / Automatons / Fawkes < prev    next >
Text File  |  1991-07-27  |  502b  |  29 lines

  1. AUTOMATON*
  2.  
  3.   Fawkes
  4.  
  5.   A 256 state automaton using the Moore neighbourhood. Each cell is replaced
  6.   by the average of it's eight neighbours, either incremented or decremented
  7.   by one depending on whether the original cell has even or odd state. Try
  8.   100x50 for the window size.
  9.  
  10. INITIALISATION*
  11.  
  12.   10DEF PROCdo
  13.   20*SetEval wrap on
  14.   30ENDPROC
  15.  
  16. SCREEN*
  17.  
  18.   10DEF PROCdo
  19.   20PROCsoup(0,256,1)
  20.   30ENDPROC
  21.  
  22. CODE*
  23.  
  24. ( READ_NEIG
  25.   SUM_NEIG  3 >>
  26.   CELL 1 AND  IF (1 - ==)
  27.             ELSE (1 + ==) )
  28.  
  29. END*